# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=bandwhich
pkgver=0.22.2
pkgrel=0
pkgdesc="Terminal bandwidth utilization tool"
url="https://github.com/imsnif/bandwhich"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="https://github.com/imsnif/bandwhich/archive/v$pkgver/bandwhich-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen || true
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
0709b7eb4d3656e8a547d4caf90b285b22c366cbf3fd03c1b1db06add502cfe39336c07f4cb2a962ae4ff6383b9a1e5b75cad4e74a9057a864fbfcdb9fbd530b  bandwhich-0.22.2.tar.gz
"
